//
//  TaskRecordView.m
//  MarkPlatform
//
//  Created by xiao6 on 2017/12/27.
//  Copyright © 2017年 AT. All rights reserved.
//

#import "TaskRecordView.h"

@interface TaskRecordView()
@property (weak, nonatomic) IBOutlet UIImageView *imageView;
@property (weak, nonatomic) IBOutlet UILabel *label;

@end

@implementation TaskRecordView

+ (instancetype)viewWithNum:(NSInteger)num content:(NSString *)content {
    TaskRecordView *v = [[NSBundle mainBundle] loadNibNamed:@"TaskRecordView" owner:nil options:nil][0];
    NSString *imageName = [NSString stringWithFormat:@"step%d", (int)num];
    if (num <= 2) {
        v.imageView.image = [UIImage imageNamed:imageName];
    }
    else {
        v.imageView.image = [UIImage imageNamed:@"step1"];
    }
    v.label.text = content.length > 0 ? content : @" ";
    return v;
}

@end
